package ac.neec.data;

import java.io.Serializable;

import ac.neec.db.service.SQLManager;

public class SpecificActivities implements Serializable {
	private int activitiesID;
	private MajorHeading majorHeading;
	private String detailJP;
	private String detailENG;
	private float mets;
	private int colorCode;

	public SpecificActivities(int activitiesID, int headingID, String detailJP, String detaiENG, float mets) {
		this.activitiesID = activitiesID;
		this.detailJP = detailJP;
		this.detailENG = detaiENG;
		this.mets = mets;
		setMajoeHeading(headingID);
	}
	public SpecificActivities(int activitiesID, MajorHeading heading, String detailJP, String detaiENG, float mets) {
		this.activitiesID = activitiesID;
		this.detailJP = detailJP;
		this.detailENG = detaiENG;
		this.mets = mets;
		this.majorHeading = heading;
	}

	private void setMajoeHeading(int headingID) {
		majorHeading = SQLManager.selectMajorHeadingMatch(headingID);
	}

	public int getActivitiesID() {
		return activitiesID;
	}

	public MajorHeading getMajorHeading() {
		return majorHeading;
	}

	public String getDetailJP() {
		return detailJP;
	}

	public String getDetailENG() {
		return detailENG;
	}

	public float getMets() {
		return mets;
	}
	public String getMetsString(){
		return String.valueOf(mets);
	}
	public String getMajorHeadingTitleJP(){
		return majorHeading.getTitleJP();
	}
	public String getMajorHeadingTitleENG(){
		return majorHeading.getTitleENG();
	}
	public int getMajorHeadingID(){
		return majorHeading.getHeadingID();
	}

	public void setColorCode(int code) {
		this.colorCode = code;
	}
	public int getColorCode(){
		return colorCode;
	}
}
